import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from "uview-ui";
Vue.use(uView);
import './uni.promisify.adaptor'

Vue.config.productionTip = false
import request from 'utils/request.js'
import {
	aes_encrypt,
	aes_decrypt
} from '@/utils/aes_endecrypt.js';
Vue.prototype.aes_encrypt = aes_encrypt;
Vue.prototype.aes_decrypt = aes_decrypt;
// 手机号脱敏
Vue.filter('phoneStart', (value) => {
	if (!value) return ''
	const reg = /(\d{3})\d*(\d{4})/
	let str = value
	str = str.replace(reg, '$1****$2')
	return str
})
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
	// ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
	// ak: 'sRDDfAKpCSG5iF1rvwph4Q95M6tDCApL'
	ak: 'FkXgnl6m9m9f6oZRtSpOPIZLhXhj35KF'
})
import {
	VueJsonp
} from 'vue-jsonp';
Vue.use(VueJsonp);

App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif